package com.hmall.user.utils;

public class UserUtils {
    private static final  ThreadLocal<Long> user = new ThreadLocal<>();

    public static void setUser(Long userId){
        user.set(userId);
    }

    public static Long getUser(){
        return user.get();
    }

    public static void removeUser(){
        user.remove();
    }
}
